﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ChatGPT3._5_Turbo
{
    public partial class ModelForms : Form
    {
        private readonly string[] _options;
        public ModelForms(string[] options)
        {
            InitializeComponent();
            _options = options;
            cbx_Models.Items.AddRange(_options);
        }


        private void cbx_Models_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void ModelForms_Load(object sender, EventArgs e)
        {
            if (cbx_Models.Items.Cast<string>().Any(item => item.Contains("gpt-3.5-turbo")))
            {
                cbx_Models.SelectedItem = "gpt-3.5-turbo";
            }

            //
        }
        public string Selection
        {
            get { return (string)cbx_Models.SelectedItem;  }
        }
        private void btn_Select_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }
    }
}
